<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Map和Object区别</title>
</head>
<body>
    <script>
        let obj1 = {
            name:'atguigu',
            age:10,
            toString:function(){
                return 'to1111'
            }
        }

        console.log('tostring:',obj1.toString(),obj1);// [object Object]

        let obj2 = {
            className:'h5220331',
            num:97
        }

        // let m = new Map();
        // m.set(obj1,obj2);// map可以以任意类型为key

        // console.log(m);

        // console.log(m.get(obj1))

        // obj1.xxx = obj2;

        let obj3 = {
            [obj1]:'test obj1'
        }
        console.log(obj3);

    </script>
</body>
</html>